package cn.com.lyj6851.modules.edu.service.mapper;

import cn.com.lyj6851.common.mapper.CoreMapper;
import cn.com.lyj6851.modules.edu.domain.EduCourse;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Repository;

/**
 * @author Administrator
 */
@Repository
public interface EduCourseMapper extends CoreMapper<EduCourse> {

    /**
     * 浏览量+1
     * @param courseId
     * @return
     */
    @Update("update edu_course set view_count=view_count+1 where id = #{courseId}")
    int incBrowseNum(@Param("courseId") Long courseId);
}
